//
//  MainViewController.swift
//  LLBBaseVC_Example
//
//  Created by Yun on 2018/11/1.
//  Copyright © 2018 CocoaPods. All rights reserved.
//

import UIKit
import LLBBaseVC


class MainViewController: LLBBaseTableViewController {

    var a:Int = 1
    
    override func viewDidLoad() {
        super.viewDidLoad()
        self.navigationItem.title = "首页"
        print(test())
        print(a)
        let t = TestClass()
        t.sayHello(name: "张三")
    }

    override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
        let detail = DetailViewController()
        detail.hidesBottomBarWhenPushed = true
        self.navigationController?.pushViewController(detail, animated: true)
    }
    
    override func viewWillAppear(_ animated: Bool) {
        super.viewWillAppear(animated)
        navigationBackGroundColor = UIColor.hex(from: 0xFFFFFFFF)
        navigationTitleColor = UIColor.black
    }
    
    func test() ->Int {
        defer {
            a = a + 10
        }
        return a
    }
}
